<!DOCTYPE html>
<html lang="zh-CN">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Apache Tomcat 完全指南</title>
    <link href="https://cdn.staticfile.org/font-awesome/6.4.0/css/all.min.css" rel="stylesheet">
    <link href="https://cdn.staticfile.org/tailwindcss/2.2.19/tailwind.min.css" rel="stylesheet">
    <link href="https://fonts.googleapis.com/css2?family=Noto+Serif+SC:wght@400;500;600;700&family=Noto+Sans+SC:wght@300;400;500;700&display=swap" rel="stylesheet">
    <script src="https://cdn.jsdelivr.net/npm/mermaid@latest/dist/mermaid.min.js"></script>
    <style>
        body {
            font-family: 'Noto Sans SC', Tahoma, Arial, Roboto, "Droid Sans", "Helvetica Neue", "Droid Sans Fallback", "Heiti SC", "Hiragino Sans GB", Simsun, sans-serif;
            background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
            min-height: 100vh;
        }
        
        .hero-gradient {
            background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
        }
        
        .content-card {
            background: rgba(255, 255, 255, 0.95);
            backdrop-filter: blur(10px);
            transition: all 0.3s ease;
        }
        
        .content-card:hover {
            transform: translateY(-2px);
            box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
        }
        
        .feature-icon {
            background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
            -webkit-background-clip: text;
            -webkit-text-fill-color: transparent;
        }
        
        .step-number {
            background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
            color: white;
            width: 40px;
            height: 40px;
            display: flex;
            align-items: center;
            justify-content: center;
            border-radius: 50%;
            font-weight: bold;
            flex-shrink: 0;
        }
        
        .section-title {
            position: relative;
            display: inline-block;
            padding-bottom: 10px;
        }
        
        .section-title::after {
            content: '';
            position: absolute;
            bottom: 0;
            left: 0;
            width: 60px;
            height: 3px;
            background: linear-gradient(90deg, #667eea 0%, #764ba2 100%);
            border-radius: 2px;
        }
        
        .image-container {
            overflow: hidden;
            border-radius: 12px;
            box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
        }
        
        .image-container img {
            transition: transform 0.3s ease;
        }
        
        .image-container:hover img {
            transform: scale(1.05);
        }
        
        .mermaid {
            background: white;
            padding: 20px;
            border-radius: 12px;
            box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
        }
        
        .floating-icon {
            animation: float 3s ease-in-out infinite;
        }
        
        @keyframes float {
            0%, 100% { transform: translateY(0px); }
            50% { transform: translateY(-10px); }
        }
        
        .drop-cap {
            float: left;
            font-size: 4rem;
            line-height: 1;
            font-weight: 700;
            margin-right: 8px;
            margin-top: -8px;
            color: #667eea;
            font-family: 'Noto Serif SC', serif;
        }
    </style>
</head>
<body>
    <!-- Hero Section -->
    <section class="hero-gradient text-white py-20 px-6">
        <div class="max-w-6xl mx-auto text-center">
            <div class="floating-icon inline-block mb-6">
                <i class="fas fa-server text-6xl opacity-90"></i>
            </div>
            <h1 class="text-5xl md:text-6xl font-bold mb-6 tracking-tight">Apache Tomcat</h1>
            <p class="text-xl md:text-2xl mb-8 opacity-90 max-w-3xl mx-auto leading-relaxed">
                轻量级 Java Web 应用服务器的完全指南
            </p>
            <div class="flex flex-wrap justify-center gap-4 text-sm md:text-base">
                <span class="bg-white bg-opacity-20 px-4 py-2 rounded-full backdrop-blur">
                    <i class="fas fa-check-circle mr-2"></i>开源免费
                </span>
                <span class="bg-white bg-opacity-20 px-4 py-2 rounded-full backdrop-blur">
                    <i class="fas fa-rocket mr-2"></i>高性能
                </span>
                <span class="bg-white bg-opacity-20 px-4 py-2 rounded-full backdrop-blur">
                    <i class="fas fa-cogs mr-2"></i>易于配置
                </span>
            </div>
        </div>
    </section>

    <!-- Main Content -->
    <main class="max-w-6xl mx-auto px-6 py-12">
        
        <!-- 学习目标 -->
        <section class="mb-16">
            <div class="content-card rounded-2xl shadow-xl p-8 md:p-12">
                <h2 class="section-title text-3xl font-bold mb-6 text-gray-800">
                    <i class="fas fa-bullseye mr-3 feature-icon"></i>学习目标
                </h2>
                <p class="text-lg text-gray-700 leading-relaxed">
                    <span class="drop-cap">学</span>习和理解 Tomcat 的基本概念、安装配置以及应用部署方法。通过本指南，您将掌握 Tomcat 服务器的核心知识，能够独立完成 Java Web 应用的部署和管理。
                </p>
            </div>
        </section>

        <!-- Tomcat 简介 -->
        <section class="mb-16">
            <div class="content-card rounded-2xl shadow-xl p-8 md:p-12">
                <h2 class="section-title text-3xl font-bold mb-6 text-gray-800">
                    <i class="fas fa-info-circle mr-3 feature-icon"></i>Tomcat 简介
                </h2>
                <p class="text-lg text-gray-700 leading-relaxed mb-8">
                    Tomcat（全称 Apache Tomcat）是一个开源的、轻量级的 Java Servlet 容器，由 Apache 软件基金会开发和维护。作为一个 Java Servlet 容器，Tomcat 的主要功能是运行 Java Servlet 和 JavaServer Pages（JSP）等 Java EE 技术的 Web 应用程序。
                </p>
                <div class="image-container mb-8">
                    <img src="https://cdn.nlark.com/yuque/0/2024/png/21449790/1708486453432-5868c23d-6f14-411a-83d3-b7f62e169b1c.png" 
                         alt="Tomcat Logo" 
                         class="w-full">
                </div>
            </div>
        </section>

        <!-- 主要特性 -->
        <section class="mb-16">
            <div class="content-card rounded-2xl shadow-xl p-8 md:p-12">
                <h2 class="section-title text-3xl font-bold mb-8 text-gray-800">
                    <i class="fas fa-star mr-3 feature-icon"></i>Tomcat 的主要特性
                </h2>
                <div class="image-container mb-10">
                    <img src="https://cdn.nlark.com/yuque/0/2024/png/21449790/1708486646623-deb70cd4-be26-43c3-a9b5-44c567d50c02.png" 
                         alt="Tomcat Features" 
                         class="w-full">
                </div>
                <div class="grid md:grid-cols-2 gap-6">
                    <div class="bg-gradient-to-br from-purple-50 to-pink-50 p-6 rounded-xl hover:shadow-lg transition-all">
                        <h3 class="font-bold text-lg mb-3 text-purple-800">
                            <i class="fas fa-code mr-2"></i>支持 Java Servlet 和 JSP 技术
                        </h3>
                        <p class="text-gray-700">Tomcat 是一个 Java Servlet 容器，支持 Java Servlet 和 JavaServer Pages（JSP）等 Java EE 技术，用于构建动态的 Web 应用程序。</p>
                    </div>
                    <div class="bg-gradient-to-br from-blue-50 to-cyan-50 p-6 rounded-xl hover:shadow-lg transition-all">
                        <h3 class="font-bold text-lg mb-3 text-blue-800">
                            <i class="fas fa-feather mr-2"></i>轻量级且易于管理
                        </h3>
                        <p class="text-gray-700">Tomcat 采用轻量级设计，安装简单、配置灵活，易于管理和维护，是 Java Web 应用服务器中较为流行的选择之一。</p>
                    </div>
                    <div class="bg-gradient-to-br from-green-50 to-emerald-50 p-6 rounded-xl hover:shadow-lg transition-all">
                        <h3 class="font-bold text-lg mb-3 text-green-800">
                            <i class="fas fa-tachometer-alt mr-2"></i>高性能和可伸缩性
                        </h3>
                        <p class="text-gray-700">Tomcat 具有良好的性能和可伸缩性，能够处理大量并发请求，并且能够通过集群和负载均衡等方式实现水平扩展。</p>
                    </div>
                    <div class="bg-gradient-to-br from-yellow-50 to-orange-50 p-6 rounded-xl hover:shadow-lg transition-all">
                        <h3 class="font-bold text-lg mb-3 text-yellow-800">
                            <i class="fas fa-layer-group mr-2"></i>多版本规范支持
                        </h3>
                        <p class="text-gray-700">Tomcat 支持多个版本的 Java Servlet 和 JSP 规范，可以满足不同版本的 Java Web 应用程序的需求。</p>
                    </div>
                    <div class="bg-gradient-to-br from-red-50 to-pink-50 p-6 rounded-xl hover:shadow-lg transition-all">
                        <h3 class="font-bold text-lg mb-3 text-red-800">
                            <i class="fas fa-gift mr-2"></i>开源和免费
                        </h3>
                        <p class="text-gray-700">Tomcat 是一个开源项目，遵循 Apache 许可证，可以免费使用和修改，用户可以根据自己的需求对 Tomcat 进行定制和扩展。</p>
                    </div>
                    <div class="bg-gradient-to-br from-indigo-50 to-purple-50 p-6 rounded-xl hover:shadow-lg transition-all">
                        <h3 class="font-bold text-lg mb-3 text-indigo-800">
                            <i class="fas fa-puzzle-piece mr-2"></i>丰富的功能和扩展性
                        </h3>
                        <p class="text-gray-700">Tomcat 提供了丰富的功能和扩展性，支持 SSL/TLS 加密、HTTP/2 协议、连接池、虚拟主机、安全管理等功能。</p>
                    </div>
                </div>
            </div>
        </section>

        <!-- 安装和配置 -->
        <section class="mb-16">
            <div class="content-card rounded-2xl shadow-xl p-8 md:p-12">
                <h2 class="section-title text-3xl font-bold mb-8 text-gray-800">
                    <i class="fas fa-download mr-3 feature-icon"></i>Tomcat 的安装和配置
                </h2>
                <div class="image-container mb-10">
                    <img src="https://cdn.nlark.com/yuque/0/2024/png/21449790/1708487415244-d6e0550e-df18-47f4-8b36-f179639441f7.png" 
                         alt="Tomcat Installation" 
                         class="w-full">
                </div>
                <div class="space-y-6">
                    <div class="flex gap-4">
                        <div class="step-number">1</div>
                        <div class="flex-1">
                            <h3 class="font-bold text-lg mb-2">下载 Tomcat</h3>
                            <p class="text-gray-700">首先，从 Apache Tomcat 官方网站下载最新版本的 Tomcat 压缩文件（tar.gz 或 zip 格式）到本地计算机。下载地址：<a href="https://tomcat.apache.org/download.cgi" class="text-purple-600 hover:text-purple-800 underline">Tomcat 官方网站</a>。</p>
                        </div>
                    </div>
                    <div class="flex gap-4">
                        <div class="step-number">2</div>
                        <div class="flex-1">
                            <h3 class="font-bold text-lg mb-2">解压文件</h3>
                            <p class="text-gray-700">将下载的压缩文件解压缩到你选择的目录中。你可以选择将 Tomcat 解压到任意目录，只要确保你有权限在那个目录中运行 Tomcat。</p>
                        </div>
                    </div>
                    <div class="flex gap-4">
                        <div class="step-number">3</div>
                        